# -*- coding: utf-8 -*-
"""
@Env 
@Time 2024/9/11 下午2:15
@Author yzpang
@Function: 
"""
from modelserver.evaluate.paddle_evaluate import EvaluatePaddle


def evaluate():
    # model_path = r'E:\AI\models\paddle\checkpoint'
    # model_path = r'E:\AI\models\paddle\multi-checkpoint'
    # label_path = r'E:\AI\datasets\paddle\multi-class-train\label.txt'
    # data_path = r'E:\AI\datasets\paddle\multi-class-train\dev.txt'
    model_path = r"E:\AI\models\paddle\new-hierarchical-checkpoint"
    label_path = r'E:\AI\datasets\paddle\hierarchical-class-train\label.txt'
    data_path = r'E:\AI\datasets\paddle\hierarchical-class-train\dev.txt'
    evaluator = EvaluatePaddle(model_path=model_path, classification_type='hierarchical-class')
    result = evaluator.evaluate(label_path, data_path)
    print(f"Accuracy: {result}")


if __name__ == '__main__':
    evaluate()
